package com.open.capacity.common.util.skf;

import com.sun.jna.Structure;

import java.util.Arrays;
import java.util.Base64;
import java.util.List;

public class Struct_SM3BLOB extends Structure {
    public byte[] sm3 = new byte[32];

    public static class ByReference extends Struct_SM3BLOB implements Structure.ByReference {
    }

    public static class ByValue extends Struct_SM3BLOB implements Structure.ByValue {
    }

    public byte[] get_sm3() {
        return sm3;
    }

    public String get_sm3_b64() {
        String sm3_b64 = Base64.getEncoder().encodeToString(sm3);
        return sm3_b64;
    }

    @Override
    protected List getFieldOrder() {
        return Arrays.asList(new String[]{"sm3"});
    }
}
